<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/all.conf.php');
require_once(__PHY_LIB.'/inc/page.inc.php');
require_once(__PHY_LIB.'/class/uWork.class.php');
require_once(__PHY_LIB.'/class/uUser.class.php');
require_once(__PHY_LIB.'/class/uCategory.class.php');

$rP = validate($_GET, 'id:n');

$oHomeWork = new uWork($rP['id']);
$oTpl->assign('rHomeWork', $oHomeWork->getData());

$oCtgry = new uCategory($oHomeWork->get('category_id'));
$oCtgry->set('BreadCrumb', $oCtgry->fetchBreadCrumb());
$oTpl->assign('rCtgry', $oCtgry->getData());

$oUser = new uUser($oHomeWork->get('owner_id'));
$oTpl->assign('rOwner', $oUser->getData());


$oTpl->display(dirname(__FILE__).'/'.basename(__FILE__, '.php').'.tpl');
?>
